home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
biz
/
demo
/
imagefxdemo.dms
/
imagefxdemo.adf
/
rexx
/
Border.ifx
next >
Wrap
Text File
|
1992-09-24
|
1KB
|
97 lines
/*
* $VER: Border 1.00.00 (24.9.92)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* This program will generate a 3D-looking border around the
* current image.
*
*/
OPTIONS RESULTS
GetMain ; IF result = "" THEN EXIT ; PARSE VAR result name width height depth
RequestNumber '"Border Thickness (Pixels):"' 1 30 10
IF rc ~= 0 THEN EXIT 0 /* cancelled? */
count = result
LockInput
SaveUndo ; Undo Off
BeginBar 'Border' count
LockGUI
Redraw Off
step = 255 / (count-3)
grey = step
le = 0
te = 0
wid = width
ht = height
DO i = 0 TO count - 3
UnlockGUI
Bar i
LockGUI
/* the bright side */
SetPalette '-1' grey grey grey
Line le te le+wid-1 te
Line le te le te+ht-1
/* the dark side */
SetPalette '-1' grey*2/3 grey*2/3 grey*2/3
Line le+wid-1 te le+wid-1 te+ht-1
Line le+wid-1 te+ht-1 le te+ht-1
grey = grey + step
le = le + 1
te = te + 1
wid = wid - 2
ht = ht - 2
END
grey = 255 - step
DO WHILE i < count
UnlockGUI
Bar i
LockGUI
/* the bright side */
SetPalette '-1' grey grey grey
Line le te le+wid-1 te
Line le te le te+ht-1
/* the dark side */
SetPalette '-1' grey*2/3 grey*2/3 grey*2/3
Line le+wid-1 te le+wid-1 te+ht-1
Line le+wid-1 te+ht-1 le te+ht-1
grey = grey - step
le = le + 1
te = te + 1
wid = wid - 2
ht = ht - 2
i = i + 1
END
UnlockGUI
EndBar
Redraw On ; Undo On
Redraw
UnlockInput
EXIT